/*
Copyright (C) BABEC. All rights reserved.
Copyright (C) THL A29 Limited, a Tencent company. All rights reserved.

SPDX-License-Identifier: Apache-2.0
*/

package config

type PWKConfig struct {
	Item []pwkItemConfig `mapstructure:"pwk_config"`
}

type pwkItemConfig struct {
	Domain    string          `mapstructure:"domain"`
	HostName  string          `mapstructure:"host_name"`
	PKAlgo    string          `mapstructure:"pk_algo"`
	HashAlgo  string          `mapstructure:"hash_algo"`
	TLSMode   int             `mapstructure:"tls_mode"`
	Specs     specsConfig     `mapstructure:"specs"`
	Location  locationConfig  `mapstructure:"location"`
	Count     int32           `mapstructure:"count"`
	CA        caConfig        `mapstructure:"ca"`
	Admin     pwkAdminConfig  `mapstructure:"admin"`
	Node      []pwkNodeConfig `mapstructure:"node"`
	User      []pwkUserConfig `mapstructure:"user"`
	P11Config pkcs11Config    `mapstructure:"pkcs11"`
	KMSConfig kmsConfig       `mapstructure:"kms"`
}

type pwkUserConfig struct {
	Type       string         `mapstructure:"type"`
	Count      int32          `mapstructure:"count"`
	Location   locationConfig `mapstructure:"location"`
	ExpireYear int32          `mapstructure:"expire_year"`
	KeyId      string         `mapstructure:"key_id"`
}

type pwkNodeConfig struct {
	Type     string         `mapstructure:"type"`
	Count    int32          `mapstructure:"count"`
	Location locationConfig `mapstructure:"location"`
	Specs    specsConfig    `mapstructure:"specs"`
	KeyId    string         `mapstructure:"key_id"`
}

type pwkAdminConfig struct {
}
